import request from "@/utils/request";

const path = '/link'

// 友链分页查询
export const linkPageList = (pageParams, params) => {
  return request({
    url: path + `/page/${pageParams.page}/${pageParams.limit}`,
    params
  })
}

// 删除友链
export const delLink = (id) => {
  return request({
    url: path + `/del/${id}`,
    method: 'delete'
  })
}

// 审核友链
export const auditLink = (status, data) => {
  return request({
    url: path + `/applyfor/${status}`,
    method: 'put',
    data
  })
}

// 查询待审核友链
export const getPendingLink = () => {
  return request({
    url: path + `/pendinglink`
  })
}